home *** CD-ROM | disk | FTP | other *** search
- Path: news.u.washington.edu!dfitts
- From: dfitts@u.washington.edu (Douglas Fitts)
- Newsgroups: comp.lang.c
- Subject: Re: Help! Can't read input from keyboard!
- Date: 2 Apr 1996 10:33:24 GMT
- Organization: University of Washington
- Message-ID: <4jqvpk$g49@nntp5.u.washington.edu>
- References: <4jq0ts$5mh@taniemarie.solon.com> <4jqpe9$2uh@news.tamu.edu>
- NNTP-Posting-Host: homer23.u.washington.edu
- NNTP-Posting-User: dfitts
-
- ewm1006@tam2000.tamu.edu (Erik Wayne Mckee) writes:
-
- >Peter Seebach (seebs@taniemarie.solon.com) wrote:
- >: I guess I thought I knew C, but maybe not. The following program compiles
- >: without error with
-
- <snip>
-
- >: (void) sscanf, "3", "%d", i;
- >: (void) printf, "%d", i;
-
- >Why not try the following:
- >#include <stdio.h>
- >int main(void) {
- > int i=0;
- > scanf("%d",i);
- ^^
- > printf("%d",i);
- >}
-
- uh, try:
-
- scanf("%d", &i);
-
- Doug
-